{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#  <span style=\"color:orange\">Association Rule Mining Tutorial (ARUL101)</span>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Created using: PyCaret 2.0** <br />\n",
    "**Date Updated: August 24, 2020**\n",
    "\n",
    "# 1.0 Objective of Tutorial\n",
    "Welcome to Association Rule Mining Tutorial **(ARUL101)**. This tutorial assumes that you are new to PyCaret and looking to get started with Association Rule Mining using `pycaret.arules` Module.\n",
    "\n",
    "In this tutorial we will learn:\n",
    "\n",
    "\n",
    "* **Getting Data:**  How to import data from PyCaret repository?\n",
    "* **Setting up Environment:**  How to setup experiment in PyCaret to get started with association rule mining?\n",
    "* **Create Model:**  How to create a model to evaluate results?\n",
    "* **Plot Model:**  How to analyze model using various plots?\n",
    "\n",
    "Read Time : Approx. 15 Minutes\n",
    "\n",
    "\n",
    "## 1.1 Installing PyCaret\n",
    "First step to get started with PyCaret is to install PyCaret. Installing pycaret is easy and take few minutes only. Follow the instructions below:\n",
    "\n",
    "#### Installing PyCaret in Local Jupyter Notebook\n",
    "`pip install pycaret`  <br />\n",
    "\n",
    "#### Installing PyCaret on Google Colab or Azure Notebooks\n",
    "`!pip install pycaret`\n",
    "\n",
    "\n",
    "## 1.2 Pre-Requisites\n",
    "- Python 3.6 or greater\n",
    "- PyCaret 2.0 or greater\n",
    "- Internet connection to load data from PyCaret's repository\n",
    "- Basic Knowledge of Association Rule Mining\n",
    "\n",
    "## 1.3 For Google colab users:\n",
    "If you are running this notebook on Google Colab, run the following code at top of your notebook to display interactive visuals.<br/>\n",
    "<br/>\n",
    "`from pycaret.utils import enable_colab` <br/>\n",
    "`enable_colab()`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 2.0 What is Association Rule Mining?\n",
    "Association rule learning is a rule-based machine learning method for discovering interesting relations between variables in large databases. It is intended to identify strong rules discovered in databases using some measures of interestingness. For example, the rule {onions, potatoes} --> {burger} found in the sales data of a supermarket would indicate that if a customer buys onions and potatoes together, they are likely to also buy burger. Such information can be used as the basis for decisions about marketing activities such as, e.g., promotional pricing or product placements.\n",
    "\n",
    "__[Learn More about Association Rule Mining](https://en.wikipedia.org/wiki/Association_rule_learning)__"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 3.0 Overview of Association Rule Module in PyCaret\n",
    "PyCaret's association rule module (`pycaret.arules`) is a supervised machine learning module which is used for discovering interesting relations between variables in the dataset. This module automatically transforms any transactional database into a shape that is acceptable for the apriori algorithm. Apriori is an algorithm for frequent item set mining and association rule learning over relational databases."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 4.0 Dataset for the Tutorial"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For this tutorial we will use a small sample from UCI dataset called **Online Retail Dataset**. This is a transactional dataset which contains transactions occurring between 01/12/2010 and 09/12/2011 for a UK-based and registered non-store online retail. The company mainly sells unique all-occasion gifts. Many customers of the company are wholesalers. Short description of attributes are as follows:\n",
    "\n",
    "- **InvoiceNo:** Invoice number. Nominal, a 6-digit integral number uniquely assigned to each transaction. If this code starts with letter 'c', it indicates a cancellation.\n",
    "- **StockCode:** Product (item) code. Nominal, a 5-digit integral number uniquely assigned to each distinct product.\n",
    "- **Description:** Product (item) name. Nominal.\n",
    "- **Quantity:** The quantities of each product (item) per transaction. Numeric.\n",
    "- **InvoiceData:** Invice Date and time. Numeric, the day and time when each transaction was generated.\n",
    "- **UnitPrice:** Unit price. Numeric, Product price per unit in sterling.\n",
    "- **CustomerID:** Customer number. Nominal, a 5-digit integral number uniquely assigned to each customer.\n",
    "- **Country:** Country name. Nominal, the name of the country where each customer resides.\n",
    "\n",
    "#### Dataset Acknowledgement:\n",
    "Dr Daqing Chen, Director: Public Analytics group. chend@lsbu.ac.uk, School of Engineering, London South Bank University, London SE1 0AA, UK.\n",
    "\n",
    "\n",
    "The original dataset and data dictionary can be __[found here.](http://archive.ics.uci.edu/ml/datasets/online+retail)__ "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 5.0 Getting the Data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "You can download the data from the original source __[found here](http://archive.ics.uci.edu/ml/datasets/online+retail)__ and load it using pandas __[(Learn How)](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html)__ or you can use PyCaret's data respository to load the data using `get_data()` function (This will require internet connection)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:25.413728Z",
     "start_time": "2020-05-02T09:56:24.728251Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>InvoiceNo</th>\n",
       "      <th>StockCode</th>\n",
       "      <th>Description</th>\n",
       "      <th>Quantity</th>\n",
       "      <th>InvoiceDate</th>\n",
       "      <th>UnitPrice</th>\n",
       "      <th>CustomerID</th>\n",
       "      <th>Country</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>536370</td>\n",
       "      <td>22728</td>\n",
       "      <td>ALARM CLOCK BAKELIKE PINK</td>\n",
       "      <td>24</td>\n",
       "      <td>12/1/2010 8:45</td>\n",
       "      <td>3.75</td>\n",
       "      <td>12583.0</td>\n",
       "      <td>France</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>536370</td>\n",
       "      <td>22727</td>\n",
       "      <td>ALARM CLOCK BAKELIKE RED</td>\n",
       "      <td>24</td>\n",
       "      <td>12/1/2010 8:45</td>\n",
       "      <td>3.75</td>\n",
       "      <td>12583.0</td>\n",
       "      <td>France</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>536370</td>\n",
       "      <td>22726</td>\n",
       "      <td>ALARM CLOCK BAKELIKE GREEN</td>\n",
       "      <td>12</td>\n",
       "      <td>12/1/2010 8:45</td>\n",
       "      <td>3.75</td>\n",
       "      <td>12583.0</td>\n",
       "      <td>France</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>536370</td>\n",
       "      <td>21724</td>\n",
       "      <td>PANDA AND BUNNIES STICKER SHEET</td>\n",
       "      <td>12</td>\n",
       "      <td>12/1/2010 8:45</td>\n",
       "      <td>0.85</td>\n",
       "      <td>12583.0</td>\n",
       "      <td>France</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>536370</td>\n",
       "      <td>21883</td>\n",
       "      <td>STARS GIFT TAPE</td>\n",
       "      <td>24</td>\n",
       "      <td>12/1/2010 8:45</td>\n",
       "      <td>0.65</td>\n",
       "      <td>12583.0</td>\n",
       "      <td>France</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  InvoiceNo StockCode                      Description  Quantity  \\\n",
       "0    536370     22728        ALARM CLOCK BAKELIKE PINK        24   \n",
       "1    536370     22727        ALARM CLOCK BAKELIKE RED         24   \n",
       "2    536370     22726       ALARM CLOCK BAKELIKE GREEN        12   \n",
       "3    536370     21724  PANDA AND BUNNIES STICKER SHEET        12   \n",
       "4    536370     21883                 STARS GIFT TAPE         24   \n",
       "\n",
       "      InvoiceDate  UnitPrice  CustomerID Country  \n",
       "0  12/1/2010 8:45       3.75     12583.0  France  \n",
       "1  12/1/2010 8:45       3.75     12583.0  France  \n",
       "2  12/1/2010 8:45       3.75     12583.0  France  \n",
       "3  12/1/2010 8:45       0.85     12583.0  France  \n",
       "4  12/1/2010 8:45       0.65     12583.0  France  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from pycaret.datasets import get_data\n",
    "data = get_data('france')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Note:** If you are downloading the data from original source, you have to filter `Country` for 'France' only, if you wish to reproduce the results in this experiment."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:25.418072Z",
     "start_time": "2020-05-02T09:56:25.415106Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(8557, 8)"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#check the shape of data\n",
    "data.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 6.0 Setting up Environment in PyCaret"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`setup()` function initializes the environment in PyCaret and transforms the transactional dataset into a shape that is acceptable to Apriori algorithm. It requires three mandatory parameters: pandas dataframe, `transaction_id` which is the name of column representing transaction id and will be used to pivot the matrix; and `item_id` which is the name of the column used for creation of rules. Normally, this will be the variable of interest. You can also pass an optional parameter `ignore_items` to ignore certain values for creation of rule."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:25.422105Z",
     "start_time": "2020-05-02T09:56:25.419668Z"
    }
   },
   "outputs": [],
   "source": [
    "from pycaret.arules import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:25.615305Z",
     "start_time": "2020-05-02T09:56:25.423570Z"
    },
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_11f14530_e645_11ea_a80e_482ae32b83da\" ><thead>    <tr>        <th class=\"col_heading level0 col0\" >Description</th>        <th class=\"col_heading level0 col1\" >Value</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                                <td id=\"T_11f14530_e645_11ea_a80e_482ae32b83darow0_col0\" class=\"data row0 col0\" >session_id</td>\n",
       "                        <td id=\"T_11f14530_e645_11ea_a80e_482ae32b83darow0_col1\" class=\"data row0 col1\" >7256</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                                <td id=\"T_11f14530_e645_11ea_a80e_482ae32b83darow1_col0\" class=\"data row1 col0\" ># Transactions</td>\n",
       "                        <td id=\"T_11f14530_e645_11ea_a80e_482ae32b83darow1_col1\" class=\"data row1 col1\" >461</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                                <td id=\"T_11f14530_e645_11ea_a80e_482ae32b83darow2_col0\" class=\"data row2 col0\" ># Items</td>\n",
       "                        <td id=\"T_11f14530_e645_11ea_a80e_482ae32b83darow2_col1\" class=\"data row2 col1\" >1565</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                                <td id=\"T_11f14530_e645_11ea_a80e_482ae32b83darow3_col0\" class=\"data row3 col0\" >Ignore Items</td>\n",
       "                        <td id=\"T_11f14530_e645_11ea_a80e_482ae32b83darow3_col1\" class=\"data row3 col1\" >None</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x1e4ac7297c8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "exp_arul101 = setup(data = data, \n",
    "                    transaction_id = 'InvoiceNo',\n",
    "                    item_id = 'Description') "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Once the setup is succesfully executed it prints the information grid that contains few important information:\n",
    "\n",
    "- **# Transactions :**  Unique number of transactions in the dataset. In this case unique `InvoiceNo`. <br/>\n",
    "<br/>\n",
    "- **# Items :** Unique number of items in the dataset. In this case `Description`. <br/>\n",
    "<br/>\n",
    "- **Ignore Items :** Items to be ignored in rule mining. Many times there are relations which are too obvious and you might want to ignore them for this analysis. For example: many transactional datasets will contain shipping cost which is very obvious relationship that can be ignored in `setup()` using `ignore_items` parameter. In this tutorial, we will run the `setup()` twice, first without ignoring any items and later with ignoring items. <br/>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 7.0 Create a Model"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Creating an association rule model is simple. `create_model()` requires no mandatory parameters. It has 4 optional parameters which are as follows:\n",
    "\n",
    "- **metric:** Metric to evaluate if a rule is of interest. Default is set to confidence. Other available metrics include 'support', 'lift', 'leverage', 'conviction'. <br/>\n",
    "<br/>\n",
    "- **threshold:** Minimal threshold for the evaluation metric, via the `metric` parameter, to decide whether a candidate rule is of interest. Default is set to `0.5`. <br/>\n",
    "<br/>\n",
    "- **min_support:** A float between 0 and 1 for minumum support of the itemsets returned. The support is computed as the fraction `transactions_where_item(s)_occur / total_transactions`. Default is set to `0.05`. <br/>\n",
    "<br/>\n",
    "- **round:** Number of decimal places metrics in score grid will be rounded to. <br/>\n",
    "\n",
    "Let's create an association rule model with all default values."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:26.091497Z",
     "start_time": "2020-05-02T09:56:25.616666Z"
    },
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "model1 = create_model() #model created and stored in model1 variable."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:26.094815Z",
     "start_time": "2020-05-02T09:56:26.092462Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(141, 9)\n"
     ]
    }
   ],
   "source": [
    "print(model1.shape) #141 rules created."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:26.109231Z",
     "start_time": "2020-05-02T09:56:26.095904Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>antecedents</th>\n",
       "      <th>consequents</th>\n",
       "      <th>antecedent support</th>\n",
       "      <th>consequent support</th>\n",
       "      <th>support</th>\n",
       "      <th>confidence</th>\n",
       "      <th>lift</th>\n",
       "      <th>leverage</th>\n",
       "      <th>conviction</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>(JUMBO BAG WOODLAND ANIMALS)</td>\n",
       "      <td>(POSTAGE)</td>\n",
       "      <td>0.0651</td>\n",
       "      <td>0.6746</td>\n",
       "      <td>0.0651</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>1.4823</td>\n",
       "      <td>0.0212</td>\n",
       "      <td>inf</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>(SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...</td>\n",
       "      <td>(SET/6 RED SPOTTY PAPER CUPS)</td>\n",
       "      <td>0.0868</td>\n",
       "      <td>0.1171</td>\n",
       "      <td>0.0846</td>\n",
       "      <td>0.9750</td>\n",
       "      <td>8.3236</td>\n",
       "      <td>0.0744</td>\n",
       "      <td>35.3145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>(SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...</td>\n",
       "      <td>(SET/6 RED SPOTTY PAPER PLATES)</td>\n",
       "      <td>0.0868</td>\n",
       "      <td>0.1085</td>\n",
       "      <td>0.0846</td>\n",
       "      <td>0.9750</td>\n",
       "      <td>8.9895</td>\n",
       "      <td>0.0752</td>\n",
       "      <td>35.6616</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>(SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...</td>\n",
       "      <td>(SET/6 RED SPOTTY PAPER CUPS)</td>\n",
       "      <td>0.0716</td>\n",
       "      <td>0.1171</td>\n",
       "      <td>0.0694</td>\n",
       "      <td>0.9697</td>\n",
       "      <td>8.2783</td>\n",
       "      <td>0.0610</td>\n",
       "      <td>29.1345</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>(SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...</td>\n",
       "      <td>(SET/6 RED SPOTTY PAPER PLATES)</td>\n",
       "      <td>0.0716</td>\n",
       "      <td>0.1085</td>\n",
       "      <td>0.0694</td>\n",
       "      <td>0.9697</td>\n",
       "      <td>8.9406</td>\n",
       "      <td>0.0617</td>\n",
       "      <td>29.4208</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                         antecedents  \\\n",
       "0                       (JUMBO BAG WOODLAND ANIMALS)   \n",
       "1  (SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...   \n",
       "2  (SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...   \n",
       "3  (SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...   \n",
       "4  (SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...   \n",
       "\n",
       "                       consequents  antecedent support  consequent support  \\\n",
       "0                        (POSTAGE)              0.0651              0.6746   \n",
       "1    (SET/6 RED SPOTTY PAPER CUPS)              0.0868              0.1171   \n",
       "2  (SET/6 RED SPOTTY PAPER PLATES)              0.0868              0.1085   \n",
       "3    (SET/6 RED SPOTTY PAPER CUPS)              0.0716              0.1171   \n",
       "4  (SET/6 RED SPOTTY PAPER PLATES)              0.0716              0.1085   \n",
       "\n",
       "   support  confidence    lift  leverage  conviction  \n",
       "0   0.0651      1.0000  1.4823    0.0212         inf  \n",
       "1   0.0846      0.9750  8.3236    0.0744     35.3145  \n",
       "2   0.0846      0.9750  8.9895    0.0752     35.6616  \n",
       "3   0.0694      0.9697  8.2783    0.0610     29.1345  \n",
       "4   0.0694      0.9697  8.9406    0.0617     29.4208  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model1.head() #see the rules"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 8.0 Setup with `ignore_items`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In `model1` created above, notice that the number 1 rule is of `JUMBO BAG WOODLAND ANIMALS` with `POSTAGE` which is very obvious. In example below, we will use `ignore_items` parameter in `setup()` to ignore `POSTAGE` from the dataset and re-create the association rule model."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:26.115946Z",
     "start_time": "2020-05-02T09:56:26.110949Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_1879b980_e645_11ea_a319_482ae32b83da\" ><thead>    <tr>        <th class=\"col_heading level0 col0\" >Description</th>        <th class=\"col_heading level0 col1\" >Value</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                                <td id=\"T_1879b980_e645_11ea_a319_482ae32b83darow0_col0\" class=\"data row0 col0\" >session_id</td>\n",
       "                        <td id=\"T_1879b980_e645_11ea_a319_482ae32b83darow0_col1\" class=\"data row0 col1\" >6114</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                                <td id=\"T_1879b980_e645_11ea_a319_482ae32b83darow1_col0\" class=\"data row1 col0\" ># Transactions</td>\n",
       "                        <td id=\"T_1879b980_e645_11ea_a319_482ae32b83darow1_col1\" class=\"data row1 col1\" >461</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                                <td id=\"T_1879b980_e645_11ea_a319_482ae32b83darow2_col0\" class=\"data row2 col0\" ># Items</td>\n",
       "                        <td id=\"T_1879b980_e645_11ea_a319_482ae32b83darow2_col1\" class=\"data row2 col1\" >1565</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                                <td id=\"T_1879b980_e645_11ea_a319_482ae32b83darow3_col0\" class=\"data row3 col0\" >Ignore Items</td>\n",
       "                        <td id=\"T_1879b980_e645_11ea_a319_482ae32b83darow3_col1\" class=\"data row3 col1\" >['POSTAGE']</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x1e4bca58f88>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "exp_arul101 = setup(data = data, \n",
    "                    transaction_id = 'InvoiceNo',\n",
    "                    item_id = 'Description',\n",
    "                    ignore_items = ['POSTAGE']) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:26.580768Z",
     "start_time": "2020-05-02T09:56:26.117053Z"
    }
   },
   "outputs": [],
   "source": [
    "model2 = create_model()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:26.584218Z",
     "start_time": "2020-05-02T09:56:26.581801Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(45, 9)\n"
     ]
    }
   ],
   "source": [
    "print(model2.shape) #notice how only 45 rules are created vs. 141 above."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:26.598446Z",
     "start_time": "2020-05-02T09:56:26.585423Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>antecedents</th>\n",
       "      <th>consequents</th>\n",
       "      <th>antecedent support</th>\n",
       "      <th>consequent support</th>\n",
       "      <th>support</th>\n",
       "      <th>confidence</th>\n",
       "      <th>lift</th>\n",
       "      <th>leverage</th>\n",
       "      <th>conviction</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>(SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...</td>\n",
       "      <td>(SET/6 RED SPOTTY PAPER CUPS)</td>\n",
       "      <td>0.0868</td>\n",
       "      <td>0.1171</td>\n",
       "      <td>0.0846</td>\n",
       "      <td>0.9750</td>\n",
       "      <td>8.3236</td>\n",
       "      <td>0.0744</td>\n",
       "      <td>35.3145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>(SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...</td>\n",
       "      <td>(SET/6 RED SPOTTY PAPER PLATES)</td>\n",
       "      <td>0.0868</td>\n",
       "      <td>0.1085</td>\n",
       "      <td>0.0846</td>\n",
       "      <td>0.9750</td>\n",
       "      <td>8.9895</td>\n",
       "      <td>0.0752</td>\n",
       "      <td>35.6616</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>(SET/6 RED SPOTTY PAPER PLATES)</td>\n",
       "      <td>(SET/6 RED SPOTTY PAPER CUPS)</td>\n",
       "      <td>0.1085</td>\n",
       "      <td>0.1171</td>\n",
       "      <td>0.1041</td>\n",
       "      <td>0.9600</td>\n",
       "      <td>8.1956</td>\n",
       "      <td>0.0914</td>\n",
       "      <td>22.0716</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>(CHILDRENS CUTLERY SPACEBOY )</td>\n",
       "      <td>(CHILDRENS CUTLERY DOLLY GIRL )</td>\n",
       "      <td>0.0586</td>\n",
       "      <td>0.0629</td>\n",
       "      <td>0.0542</td>\n",
       "      <td>0.9259</td>\n",
       "      <td>14.7190</td>\n",
       "      <td>0.0505</td>\n",
       "      <td>12.6508</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>(SET/6 RED SPOTTY PAPER CUPS)</td>\n",
       "      <td>(SET/6 RED SPOTTY PAPER PLATES)</td>\n",
       "      <td>0.1171</td>\n",
       "      <td>0.1085</td>\n",
       "      <td>0.1041</td>\n",
       "      <td>0.8889</td>\n",
       "      <td>8.1956</td>\n",
       "      <td>0.0914</td>\n",
       "      <td>8.0239</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                         antecedents  \\\n",
       "0  (SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...   \n",
       "1  (SET/20 RED RETROSPOT PAPER NAPKINS , SET/6 RE...   \n",
       "2                    (SET/6 RED SPOTTY PAPER PLATES)   \n",
       "3                      (CHILDRENS CUTLERY SPACEBOY )   \n",
       "4                      (SET/6 RED SPOTTY PAPER CUPS)   \n",
       "\n",
       "                       consequents  antecedent support  consequent support  \\\n",
       "0    (SET/6 RED SPOTTY PAPER CUPS)              0.0868              0.1171   \n",
       "1  (SET/6 RED SPOTTY PAPER PLATES)              0.0868              0.1085   \n",
       "2    (SET/6 RED SPOTTY PAPER CUPS)              0.1085              0.1171   \n",
       "3  (CHILDRENS CUTLERY DOLLY GIRL )              0.0586              0.0629   \n",
       "4  (SET/6 RED SPOTTY PAPER PLATES)              0.1171              0.1085   \n",
       "\n",
       "   support  confidence     lift  leverage  conviction  \n",
       "0   0.0846      0.9750   8.3236    0.0744     35.3145  \n",
       "1   0.0846      0.9750   8.9895    0.0752     35.6616  \n",
       "2   0.1041      0.9600   8.1956    0.0914     22.0716  \n",
       "3   0.0542      0.9259  14.7190    0.0505     12.6508  \n",
       "4   0.1041      0.8889   8.1956    0.0914      8.0239  "
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model2.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 9.0 Plot Model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:27.577306Z",
     "start_time": "2020-05-02T09:56:26.599525Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "        <script type=\"text/javascript\">\n",
       "        window.PlotlyConfig = {MathJaxConfig: 'local'};\n",
       "        if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n",
       "        if (typeof require !== 'undefined') {\n",
       "        require.undef(\"plotly\");\n",
       "        requirejs.config({\n",
       "            paths: {\n",
       "                'plotly': ['https://cdn.plot.ly/plotly-latest.min']\n",
       "            }\n",
       "        });\n",
       "        require(['plotly'], function(Plotly) {\n",
       "            window._Plotly = Plotly;\n",
       "        });\n",
       "        }\n",
       "        </script>\n",
       "        "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.plotly.v1+json": {
       "config": {
        "plotlyServerURL": "https://plot.ly"
       },
       "data": [
        {
         "customdata": [
          [
           "SET/20 RED RETROSPOT PAPER NAPKINS ",
           "SET/6 RED SPOTTY PAPER CUPS"
          ],
          [
           "SET/20 RED RETROSPOT PAPER NAPKINS ",
           "SET/6 RED SPOTTY PAPER PLATES"
          ],
          [
           "SET/6 RED SPOTTY PAPER PLATES",
           "SET/6 RED SPOTTY PAPER CUPS"
          ],
          [
           "CHILDRENS CUTLERY SPACEBOY ",
           "CHILDRENS CUTLERY DOLLY GIRL "
          ],
          [
           "SET/6 RED SPOTTY PAPER CUPS",
           "SET/6 RED SPOTTY PAPER PLATES"
          ],
          [
           "CHILDRENS CUTLERY DOLLY GIRL ",
           "CHILDRENS CUTLERY SPACEBOY "
          ],
          [
           "ALARM CLOCK BAKELIKE GREEN",
           "ALARM CLOCK BAKELIKE RED "
          ],
          [
           "ALARM CLOCK BAKELIKE RED ",
           "ALARM CLOCK BAKELIKE GREEN"
          ],
          [
           "ALARM CLOCK BAKELIKE RED ",
           "ALARM CLOCK BAKELIKE GREEN"
          ],
          [
           "SET/6 RED SPOTTY PAPER PLATES",
           "SET/20 RED RETROSPOT PAPER NAPKINS "
          ],
          [
           "ALARM CLOCK BAKELIKE RED ",
           "ALARM CLOCK BAKELIKE PINK"
          ],
          [
           "SET/6 RED SPOTTY PAPER PLATES",
           "SET/20 RED RETROSPOT PAPER NAPKINS "
          ],
          [
           "ALARM CLOCK BAKELIKE GREEN",
           "ALARM CLOCK BAKELIKE RED "
          ],
          [
           "ALARM CLOCK BAKELIKE RED ",
           "ALARM CLOCK BAKELIKE PINK"
          ],
          [
           "SET/6 RED SPOTTY PAPER PLATES",
           "SET/20 RED RETROSPOT PAPER NAPKINS "
          ],
          [
           "SET/20 RED RETROSPOT PAPER NAPKINS ",
           "SET/6 RED SPOTTY PAPER PLATES"
          ],
          [
           "SET/20 RED RETROSPOT PAPER NAPKINS ",
           "SET/6 RED SPOTTY PAPER CUPS"
          ],
          [
           "PLASTERS IN TIN CIRCUS PARADE ",
           "PLASTERS IN TIN WOODLAND ANIMALS"
          ],
          [
           "SET/20 RED RETROSPOT PAPER NAPKINS ",
           "SET/6 RED SPOTTY PAPER PLATES"
          ],
          [
           "PLASTERS IN TIN SPACEBOY",
           "PLASTERS IN TIN WOODLAND ANIMALS"
          ],
          [
           "ALARM CLOCK BAKELIKE GREEN",
           "ALARM CLOCK BAKELIKE PINK"
          ],
          [
           "SET/6 RED SPOTTY PAPER CUPS",
           "SET/20 RED RETROSPOT PAPER NAPKINS "
          ],
          [
           "ALARM CLOCK BAKELIKE PINK",
           "ALARM CLOCK BAKELIKE GREEN"
          ],
          [
           "ALARM CLOCK BAKELIKE PINK",
           "ALARM CLOCK BAKELIKE RED "
          ],
          [
           "SET/6 RED SPOTTY PAPER CUPS",
           "SET/20 RED RETROSPOT PAPER NAPKINS "
          ],
          [
           "DOLLY GIRL LUNCH BOX",
           "SPACEBOY LUNCH BOX "
          ],
          [
           "ALARM CLOCK BAKELIKE RED ",
           "ALARM CLOCK BAKELIKE GREEN"
          ],
          [
           "PLASTERS IN TIN CIRCUS PARADE ",
           "PLASTERS IN TIN SPACEBOY"
          ],
          [
           "PLASTERS IN TIN WOODLAND ANIMALS",
           "PLASTERS IN TIN CIRCUS PARADE "
          ],
          [
           "PLASTERS IN TIN SPACEBOY",
           "PLASTERS IN TIN CIRCUS PARADE "
          ],
          [
           "ALARM CLOCK BAKELIKE GREEN",
           "ALARM CLOCK BAKELIKE RED "
          ],
          [
           "ALARM CLOCK BAKELIKE PINK",
           "ALARM CLOCK BAKELIKE RED "
          ],
          [
           "PLASTERS IN TIN WOODLAND ANIMALS",
           "PLASTERS IN TIN SPACEBOY"
          ],
          [
           "PLASTERS IN TIN WOODLAND ANIMALS",
           "PLASTERS IN TIN CIRCUS PARADE "
          ],
          [
           "PLASTERS IN TIN CIRCUS PARADE ",
           "PLASTERS IN TIN WOODLAND ANIMALS"
          ],
          [
           "ROUND SNACK BOXES SET OF 4 FRUITS ",
           "ROUND SNACK BOXES SET OF4 WOODLAND "
          ],
          [
           "SPACEBOY LUNCH BOX ",
           "DOLLY GIRL LUNCH BOX"
          ],
          [
           "LUNCH BAG WOODLAND",
           "LUNCH BAG SPACEBOY DESIGN "
          ],
          [
           "LUNCH BAG SPACEBOY DESIGN ",
           "LUNCH BAG WOODLAND"
          ],
          [
           "LUNCH BAG SPACEBOY DESIGN ",
           "LUNCH BAG RED RETROSPOT"
          ],
          [
           "LUNCH BAG SPACEBOY DESIGN ",
           "LUNCH BAG APPLE DESIGN"
          ],
          [
           "PLASTERS IN TIN CIRCUS PARADE ",
           "PLASTERS IN TIN SPACEBOY"
          ],
          [
           "STRAWBERRY LUNCH BOX WITH CUTLERY",
           "LUNCH BOX WITH CUTLERY RETROSPOT "
          ],
          [
           "LUNCH BAG APPLE DESIGN",
           "LUNCH BAG SPACEBOY DESIGN "
          ],
          [
           "LUNCH BAG APPLE DESIGN",
           "LUNCH BAG RED RETROSPOT"
          ]
         ],
         "hoverlabel": {
          "namelength": 0
         },
         "hovertemplate": "support=%{x}<br>confidence=%{y}<br>antecedents=%{customdata[0]}<br>consequents=%{customdata[1]}<br>antecedents_short=%{text}<br>lift=%{marker.color}",
         "legendgroup": "",
         "marker": {
          "color": [
           8.3236,
           8.9895,
           8.1956,
           14.719,
           8.1956,
           14.719,
           10.7409,
           10.1901,
           9.9037,
           7.2031,
           9.2944,
           7.0923,
           9.9037,
           9.0331,
           8.9895,
           7.0923,
           6.567,
           5.1604,
           7.2031,
           5.1292,
           8.5699,
           6.567,
           8.5699,
           9.0331,
           8.3236,
           6.5857,
           10.7409,
           5.6577,
           4.4645,
           4.4374,
           10.1901,
           9.2944,
           5.1292,
           4.0474,
           4.0474,
           4.1879,
           6.5857,
           5.3129,
           5.3129,
           4.0936,
           4.9942,
           4.4374,
           4.2124,
           4.9942,
           3.9298
          ],
          "coloraxis": "coloraxis",
          "opacity": 0.5,
          "symbol": "circle"
         },
         "mode": "markers+text",
         "name": "",
         "showlegend": false,
         "text": [
          "SET/20 RED",
          "SET/20 RED",
          "SET/6 RED ",
          "CHILDRENS ",
          "SET/6 RED ",
          "CHILDRENS ",
          "ALARM CLOC",
          "ALARM CLOC",
          "ALARM CLOC",
          "SET/6 RED ",
          "ALARM CLOC",
          "SET/6 RED ",
          "ALARM CLOC",
          "ALARM CLOC",
          "SET/6 RED ",
          "SET/20 RED",
          "SET/20 RED",
          "PLASTERS I",
          "SET/20 RED",
          "PLASTERS I",
          "ALARM CLOC",
          "SET/6 RED ",
          "ALARM CLOC",
          "ALARM CLOC",
          "SET/6 RED ",
          "DOLLY GIRL",
          "ALARM CLOC",
          "PLASTERS I",
          "PLASTERS I",
          "PLASTERS I",
          "ALARM CLOC",
          "ALARM CLOC",
          "PLASTERS I",
          "PLASTERS I",
          "PLASTERS I",
          "ROUND SNAC",
          "SPACEBOY L",
          "LUNCH BAG ",
          "LUNCH BAG ",
          "LUNCH BAG ",
          "LUNCH BAG ",
          "PLASTERS I",
          "STRAWBERRY",
          "LUNCH BAG ",
          "LUNCH BAG "
         ],
         "textposition": "top center",
         "type": "scatter",
         "x": [
          0.0846,
          0.0846,
          0.1041,
          0.0542,
          0.1041,
          0.0542,
          0.0542,
          0.0542,
          0.0672,
          0.0846,
          0.0542,
          0.0868,
          0.0672,
          0.0629,
          0.0846,
          0.0868,
          0.0868,
          0.0586,
          0.0846,
          0.0889,
          0.0629,
          0.0868,
          0.0629,
          0.0629,
          0.0846,
          0.0607,
          0.0542,
          0.0586,
          0.0586,
          0.0781,
          0.0542,
          0.0542,
          0.0889,
          0.0868,
          0.0868,
          0.0542,
          0.0607,
          0.0564,
          0.0564,
          0.0564,
          0.0564,
          0.0781,
          0.0542,
          0.0564,
          0.0564
         ],
         "xaxis": "x",
         "y": [
          0.975,
          0.975,
          0.96,
          0.9259,
          0.8889,
          0.8621,
          0.8621,
          0.8621,
          0.8378,
          0.8125,
          0.8065,
          0.8,
          0.7949,
          0.7838,
          0.78,
          0.7692,
          0.7692,
          0.75,
          0.75,
          0.7455,
          0.7436,
          0.7407,
          0.725,
          0.725,
          0.7222,
          0.7,
          0.6757,
          0.675,
          0.6585,
          0.6545,
          0.641,
          0.625,
          0.6119,
          0.597,
          0.5882,
          0.5814,
          0.5714,
          0.5532,
          0.5417,
          0.5417,
          0.5417,
          0.5294,
          0.5208,
          0.52,
          0.52
         ],
         "yaxis": "y"
        }
       ],
       "layout": {
        "coloraxis": {
         "colorbar": {
          "title": {
           "text": "lift"
          }
         },
         "colorscale": [
          [
           0,
           "#0d0887"
          ],
          [
           0.1111111111111111,
           "#46039f"
          ],
          [
           0.2222222222222222,
           "#7201a8"
          ],
          [
           0.3333333333333333,
           "#9c179e"
          ],
          [
           0.4444444444444444,
           "#bd3786"
          ],
          [
           0.5555555555555556,
           "#d8576b"
          ],
          [
           0.6666666666666666,
           "#ed7953"
          ],
          [
           0.7777777777777778,
           "#fb9f3a"
          ],
          [
           0.8888888888888888,
           "#fdca26"
          ],
          [
           1,
           "#f0f921"
          ]
         ]
        },
        "height": 800,
        "legend": {
         "tracegroupgap": 0
        },
        "margin": {
         "t": 60
        },
        "plot_bgcolor": "rgb(240,240,240)",
        "template": {
         "data": {
          "bar": [
           {
            "error_x": {
             "color": "#2a3f5f"
            },
            "error_y": {
             "color": "#2a3f5f"
            },
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "bar"
           }
          ],
          "barpolar": [
           {
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "barpolar"
           }
          ],
          "carpet": [
           {
            "aaxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "baxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "type": "carpet"
           }
          ],
          "choropleth": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "choropleth"
           }
          ],
          "contour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "contour"
           }
          ],
          "contourcarpet": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "contourcarpet"
           }
          ],
          "heatmap": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmap"
           }
          ],
          "heatmapgl": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmapgl"
           }
          ],
          "histogram": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "histogram"
           }
          ],
          "histogram2d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2d"
           }
          ],
          "histogram2dcontour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2dcontour"
           }
          ],
          "mesh3d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "mesh3d"
           }
          ],
          "parcoords": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "parcoords"
           }
          ],
          "pie": [
           {
            "automargin": true,
            "type": "pie"
           }
          ],
          "scatter": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter"
           }
          ],
          "scatter3d": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter3d"
           }
          ],
          "scattercarpet": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattercarpet"
           }
          ],
          "scattergeo": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergeo"
           }
          ],
          "scattergl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergl"
           }
          ],
          "scattermapbox": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattermapbox"
           }
          ],
          "scatterpolar": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolar"
           }
          ],
          "scatterpolargl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolargl"
           }
          ],
          "scatterternary": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterternary"
           }
          ],
          "surface": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "surface"
           }
          ],
          "table": [
           {
            "cells": {
             "fill": {
              "color": "#EBF0F8"
             },
             "line": {
              "color": "white"
             }
            },
            "header": {
             "fill": {
              "color": "#C8D4E3"
             },
             "line": {
              "color": "white"
             }
            },
            "type": "table"
           }
          ]
         },
         "layout": {
          "annotationdefaults": {
           "arrowcolor": "#2a3f5f",
           "arrowhead": 0,
           "arrowwidth": 1
          },
          "coloraxis": {
           "colorbar": {
            "outlinewidth": 0,
            "ticks": ""
           }
          },
          "colorscale": {
           "diverging": [
            [
             0,
             "#8e0152"
            ],
            [
             0.1,
             "#c51b7d"
            ],
            [
             0.2,
             "#de77ae"
            ],
            [
             0.3,
             "#f1b6da"
            ],
            [
             0.4,
             "#fde0ef"
            ],
            [
             0.5,
             "#f7f7f7"
            ],
            [
             0.6,
             "#e6f5d0"
            ],
            [
             0.7,
             "#b8e186"
            ],
            [
             0.8,
             "#7fbc41"
            ],
            [
             0.9,
             "#4d9221"
            ],
            [
             1,
             "#276419"
            ]
           ],
           "sequential": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ],
           "sequentialminus": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ]
          },
          "colorway": [
           "#636efa",
           "#EF553B",
           "#00cc96",
           "#ab63fa",
           "#FFA15A",
           "#19d3f3",
           "#FF6692",
           "#B6E880",
           "#FF97FF",
           "#FECB52"
          ],
          "font": {
           "color": "#2a3f5f"
          },
          "geo": {
           "bgcolor": "white",
           "lakecolor": "white",
           "landcolor": "#E5ECF6",
           "showlakes": true,
           "showland": true,
           "subunitcolor": "white"
          },
          "hoverlabel": {
           "align": "left"
          },
          "hovermode": "closest",
          "mapbox": {
           "style": "light"
          },
          "paper_bgcolor": "white",
          "plot_bgcolor": "#E5ECF6",
          "polar": {
           "angularaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "radialaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "scene": {
           "xaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "yaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "zaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           }
          },
          "shapedefaults": {
           "line": {
            "color": "#2a3f5f"
           }
          },
          "ternary": {
           "aaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "baxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "caxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "title": {
           "x": 0.05
          },
          "xaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          },
          "yaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          }
         }
        },
        "title": {
         "text": "2D Plot of Support, Confidence and Lift"
        },
        "xaxis": {
         "anchor": "y",
         "domain": [
          0,
          1
         ],
         "title": {
          "text": "support"
         },
         "type": "log"
        },
        "yaxis": {
         "anchor": "x",
         "domain": [
          0,
          1
         ],
         "title": {
          "text": "confidence"
         }
        }
       }
      },
      "text/html": [
       "<div>\n",
       "        \n",
       "        \n",
       "            <div id=\"141e6aff-c77e-4156-8b44-b300a316f583\" class=\"plotly-graph-div\" style=\"height:800px; width:100%;\"></div>\n",
       "            <script type=\"text/javascript\">\n",
       "                require([\"plotly\"], function(Plotly) {\n",
       "                    window.PLOTLYENV=window.PLOTLYENV || {};\n",
       "                    \n",
       "                if (document.getElementById(\"141e6aff-c77e-4156-8b44-b300a316f583\")) {\n",
       "                    Plotly.newPlot(\n",
       "                        '141e6aff-c77e-4156-8b44-b300a316f583',\n",
       "                        [{\"customdata\": [[\"SET/20 RED RETROSPOT PAPER NAPKINS \", \"SET/6 RED SPOTTY PAPER CUPS\"], [\"SET/20 RED RETROSPOT PAPER NAPKINS \", \"SET/6 RED SPOTTY PAPER PLATES\"], [\"SET/6 RED SPOTTY PAPER PLATES\", \"SET/6 RED SPOTTY PAPER CUPS\"], [\"CHILDRENS CUTLERY SPACEBOY \", \"CHILDRENS CUTLERY DOLLY GIRL \"], [\"SET/6 RED SPOTTY PAPER CUPS\", \"SET/6 RED SPOTTY PAPER PLATES\"], [\"CHILDRENS CUTLERY DOLLY GIRL \", \"CHILDRENS CUTLERY SPACEBOY \"], [\"ALARM CLOCK BAKELIKE GREEN\", \"ALARM CLOCK BAKELIKE RED \"], [\"ALARM CLOCK BAKELIKE RED \", \"ALARM CLOCK BAKELIKE GREEN\"], [\"ALARM CLOCK BAKELIKE RED \", \"ALARM CLOCK BAKELIKE GREEN\"], [\"SET/6 RED SPOTTY PAPER PLATES\", \"SET/20 RED RETROSPOT PAPER NAPKINS \"], [\"ALARM CLOCK BAKELIKE RED \", \"ALARM CLOCK BAKELIKE PINK\"], [\"SET/6 RED SPOTTY PAPER PLATES\", \"SET/20 RED RETROSPOT PAPER NAPKINS \"], [\"ALARM CLOCK BAKELIKE GREEN\", \"ALARM CLOCK BAKELIKE RED \"], [\"ALARM CLOCK BAKELIKE RED \", \"ALARM CLOCK BAKELIKE PINK\"], [\"SET/6 RED SPOTTY PAPER PLATES\", \"SET/20 RED RETROSPOT PAPER NAPKINS \"], [\"SET/20 RED RETROSPOT PAPER NAPKINS \", \"SET/6 RED SPOTTY PAPER PLATES\"], [\"SET/20 RED RETROSPOT PAPER NAPKINS \", \"SET/6 RED SPOTTY PAPER CUPS\"], [\"PLASTERS IN TIN CIRCUS PARADE \", \"PLASTERS IN TIN WOODLAND ANIMALS\"], [\"SET/20 RED RETROSPOT PAPER NAPKINS \", \"SET/6 RED SPOTTY PAPER PLATES\"], [\"PLASTERS IN TIN SPACEBOY\", \"PLASTERS IN TIN WOODLAND ANIMALS\"], [\"ALARM CLOCK BAKELIKE GREEN\", \"ALARM CLOCK BAKELIKE PINK\"], [\"SET/6 RED SPOTTY PAPER CUPS\", \"SET/20 RED RETROSPOT PAPER NAPKINS \"], [\"ALARM CLOCK BAKELIKE PINK\", \"ALARM CLOCK BAKELIKE GREEN\"], [\"ALARM CLOCK BAKELIKE PINK\", \"ALARM CLOCK BAKELIKE RED \"], [\"SET/6 RED SPOTTY PAPER CUPS\", \"SET/20 RED RETROSPOT PAPER NAPKINS \"], [\"DOLLY GIRL LUNCH BOX\", \"SPACEBOY LUNCH BOX \"], [\"ALARM CLOCK BAKELIKE RED \", \"ALARM CLOCK BAKELIKE GREEN\"], [\"PLASTERS IN TIN CIRCUS PARADE \", \"PLASTERS IN TIN SPACEBOY\"], [\"PLASTERS IN TIN WOODLAND ANIMALS\", \"PLASTERS IN TIN CIRCUS PARADE \"], [\"PLASTERS IN TIN SPACEBOY\", \"PLASTERS IN TIN CIRCUS PARADE \"], [\"ALARM CLOCK BAKELIKE GREEN\", \"ALARM CLOCK BAKELIKE RED \"], [\"ALARM CLOCK BAKELIKE PINK\", \"ALARM CLOCK BAKELIKE RED \"], [\"PLASTERS IN TIN WOODLAND ANIMALS\", \"PLASTERS IN TIN SPACEBOY\"], [\"PLASTERS IN TIN WOODLAND ANIMALS\", \"PLASTERS IN TIN CIRCUS PARADE \"], [\"PLASTERS IN TIN CIRCUS PARADE \", \"PLASTERS IN TIN WOODLAND ANIMALS\"], [\"ROUND SNACK BOXES SET OF 4 FRUITS \", \"ROUND SNACK BOXES SET OF4 WOODLAND \"], [\"SPACEBOY LUNCH BOX \", \"DOLLY GIRL LUNCH BOX\"], [\"LUNCH BAG WOODLAND\", \"LUNCH BAG SPACEBOY DESIGN \"], [\"LUNCH BAG SPACEBOY DESIGN \", \"LUNCH BAG WOODLAND\"], [\"LUNCH BAG SPACEBOY DESIGN \", \"LUNCH BAG RED RETROSPOT\"], [\"LUNCH BAG SPACEBOY DESIGN \", \"LUNCH BAG APPLE DESIGN\"], [\"PLASTERS IN TIN CIRCUS PARADE \", \"PLASTERS IN TIN SPACEBOY\"], [\"STRAWBERRY LUNCH BOX WITH CUTLERY\", \"LUNCH BOX WITH CUTLERY RETROSPOT \"], [\"LUNCH BAG APPLE DESIGN\", \"LUNCH BAG SPACEBOY DESIGN \"], [\"LUNCH BAG APPLE DESIGN\", \"LUNCH BAG RED RETROSPOT\"]], \"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"support=%{x}<br>confidence=%{y}<br>antecedents=%{customdata[0]}<br>consequents=%{customdata[1]}<br>antecedents_short=%{text}<br>lift=%{marker.color}\", \"legendgroup\": \"\", \"marker\": {\"color\": [8.3236, 8.9895, 8.1956, 14.719, 8.1956, 14.719, 10.7409, 10.1901, 9.9037, 7.2031, 9.2944, 7.0923, 9.9037, 9.0331, 8.9895, 7.0923, 6.567, 5.1604, 7.2031, 5.1292, 8.5699, 6.567, 8.5699, 9.0331, 8.3236, 6.5857, 10.7409, 5.6577, 4.4645, 4.4374, 10.1901, 9.2944, 5.1292, 4.0474, 4.0474, 4.1879, 6.5857, 5.3129, 5.3129, 4.0936, 4.9942, 4.4374, 4.2124, 4.9942, 3.9298], \"coloraxis\": \"coloraxis\", \"opacity\": 0.5, \"symbol\": \"circle\"}, \"mode\": \"markers+text\", \"name\": \"\", \"showlegend\": false, \"text\": [\"SET/20 RED\", \"SET/20 RED\", \"SET/6 RED \", \"CHILDRENS \", \"SET/6 RED \", \"CHILDRENS \", \"ALARM CLOC\", \"ALARM CLOC\", \"ALARM CLOC\", \"SET/6 RED \", \"ALARM CLOC\", \"SET/6 RED \", \"ALARM CLOC\", \"ALARM CLOC\", \"SET/6 RED \", \"SET/20 RED\", \"SET/20 RED\", \"PLASTERS I\", \"SET/20 RED\", \"PLASTERS I\", \"ALARM CLOC\", \"SET/6 RED \", \"ALARM CLOC\", \"ALARM CLOC\", \"SET/6 RED \", \"DOLLY GIRL\", \"ALARM CLOC\", \"PLASTERS I\", \"PLASTERS I\", \"PLASTERS I\", \"ALARM CLOC\", \"ALARM CLOC\", \"PLASTERS I\", \"PLASTERS I\", \"PLASTERS I\", \"ROUND SNAC\", \"SPACEBOY L\", \"LUNCH BAG \", \"LUNCH BAG \", \"LUNCH BAG \", \"LUNCH BAG \", \"PLASTERS I\", \"STRAWBERRY\", \"LUNCH BAG \", \"LUNCH BAG \"], \"textposition\": \"top center\", \"type\": \"scatter\", \"x\": [0.0846, 0.0846, 0.1041, 0.0542, 0.1041, 0.0542, 0.0542, 0.0542, 0.0672, 0.0846, 0.0542, 0.0868, 0.0672, 0.0629, 0.0846, 0.0868, 0.0868, 0.0586, 0.0846, 0.0889, 0.0629, 0.0868, 0.0629, 0.0629, 0.0846, 0.0607, 0.0542, 0.0586, 0.0586, 0.0781, 0.0542, 0.0542, 0.0889, 0.0868, 0.0868, 0.0542, 0.0607, 0.0564, 0.0564, 0.0564, 0.0564, 0.0781, 0.0542, 0.0564, 0.0564], \"xaxis\": \"x\", \"y\": [0.975, 0.975, 0.96, 0.9259, 0.8889, 0.8621, 0.8621, 0.8621, 0.8378, 0.8125, 0.8065, 0.8, 0.7949, 0.7838, 0.78, 0.7692, 0.7692, 0.75, 0.75, 0.7455, 0.7436, 0.7407, 0.725, 0.725, 0.7222, 0.7, 0.6757, 0.675, 0.6585, 0.6545, 0.641, 0.625, 0.6119, 0.597, 0.5882, 0.5814, 0.5714, 0.5532, 0.5417, 0.5417, 0.5417, 0.5294, 0.5208, 0.52, 0.52], \"yaxis\": \"y\"}],\n",
       "                        {\"coloraxis\": {\"colorbar\": {\"title\": {\"text\": \"lift\"}}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"height\": 800, \"legend\": {\"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"plot_bgcolor\": \"rgb(240,240,240)\", \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"title\": {\"text\": \"2D Plot of Support, Confidence and Lift\"}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"support\"}, \"type\": \"log\"}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"confidence\"}}},\n",
       "                        {\"responsive\": true}\n",
       "                    ).then(function(){\n",
       "                            \n",
       "var gd = document.getElementById('141e6aff-c77e-4156-8b44-b300a316f583');\n",
       "var x = new MutationObserver(function (mutations, observer) {{\n",
       "        var display = window.getComputedStyle(gd).display;\n",
       "        if (!display || display === 'none') {{\n",
       "            console.log([gd, 'removed!']);\n",
       "            Plotly.purge(gd);\n",
       "            observer.disconnect();\n",
       "        }}\n",
       "}});\n",
       "\n",
       "// Listen for the removal of the full notebook cells\n",
       "var notebookContainer = gd.closest('#notebook-container');\n",
       "if (notebookContainer) {{\n",
       "    x.observe(notebookContainer, {childList: true});\n",
       "}}\n",
       "\n",
       "// Listen for the clearing of the current output cell\n",
       "var outputEl = gd.closest('.output');\n",
       "if (outputEl) {{\n",
       "    x.observe(outputEl, {childList: true});\n",
       "}}\n",
       "\n",
       "                        })\n",
       "                };\n",
       "                });\n",
       "            </script>\n",
       "        </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_model(model2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-05-02T09:56:27.783321Z",
     "start_time": "2020-05-02T09:56:27.578253Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "        <script type=\"text/javascript\">\n",
       "        window.PlotlyConfig = {MathJaxConfig: 'local'};\n",
       "        if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n",
       "        if (typeof require !== 'undefined') {\n",
       "        require.undef(\"plotly\");\n",
       "        requirejs.config({\n",
       "            paths: {\n",
       "                'plotly': ['https://cdn.plot.ly/plotly-latest.min']\n",
       "            }\n",
       "        });\n",
       "        require(['plotly'], function(Plotly) {\n",
       "            window._Plotly = Plotly;\n",
       "        });\n",
       "        }\n",
       "        </script>\n",
       "        "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.plotly.v1+json": {
       "config": {
        "plotlyServerURL": "https://plot.ly"
       },
       "data": [
        {
         "customdata": [
          [
           "SET/20 RED RETROSPOT PAPER NAPKINS ",
           "SET/6 RED SPOTTY PAPER CUPS"
          ],
          [
           "SET/20 RED RETROSPOT PAPER NAPKINS ",
           "SET/6 RED SPOTTY PAPER PLATES"
          ],
          [
           "SET/6 RED SPOTTY PAPER PLATES",
           "SET/6 RED SPOTTY PAPER CUPS"
          ],
          [
           "CHILDRENS CUTLERY SPACEBOY ",
           "CHILDRENS CUTLERY DOLLY GIRL "
          ],
          [
           "SET/6 RED SPOTTY PAPER CUPS",
           "SET/6 RED SPOTTY PAPER PLATES"
          ],
          [
           "CHILDRENS CUTLERY DOLLY GIRL ",
           "CHILDRENS CUTLERY SPACEBOY "
          ],
          [
           "ALARM CLOCK BAKELIKE GREEN",
           "ALARM CLOCK BAKELIKE RED "
          ],
          [
           "ALARM CLOCK BAKELIKE RED ",
           "ALARM CLOCK BAKELIKE GREEN"
          ],
          [
           "ALARM CLOCK BAKELIKE RED ",
           "ALARM CLOCK BAKELIKE GREEN"
          ],
          [
           "SET/6 RED SPOTTY PAPER PLATES",
           "SET/20 RED RETROSPOT PAPER NAPKINS "
          ],
          [
           "ALARM CLOCK BAKELIKE RED ",
           "ALARM CLOCK BAKELIKE PINK"
          ],
          [
           "SET/6 RED SPOTTY PAPER PLATES",
           "SET/20 RED RETROSPOT PAPER NAPKINS "
          ],
          [
           "ALARM CLOCK BAKELIKE GREEN",
           "ALARM CLOCK BAKELIKE RED "
          ],
          [
           "ALARM CLOCK BAKELIKE RED ",
           "ALARM CLOCK BAKELIKE PINK"
          ],
          [
           "SET/6 RED SPOTTY PAPER PLATES",
           "SET/20 RED RETROSPOT PAPER NAPKINS "
          ],
          [
           "SET/20 RED RETROSPOT PAPER NAPKINS ",
           "SET/6 RED SPOTTY PAPER PLATES"
          ],
          [
           "SET/20 RED RETROSPOT PAPER NAPKINS ",
           "SET/6 RED SPOTTY PAPER CUPS"
          ],
          [
           "PLASTERS IN TIN CIRCUS PARADE ",
           "PLASTERS IN TIN WOODLAND ANIMALS"
          ],
          [
           "SET/20 RED RETROSPOT PAPER NAPKINS ",
           "SET/6 RED SPOTTY PAPER PLATES"
          ],
          [
           "PLASTERS IN TIN SPACEBOY",
           "PLASTERS IN TIN WOODLAND ANIMALS"
          ],
          [
           "ALARM CLOCK BAKELIKE GREEN",
           "ALARM CLOCK BAKELIKE PINK"
          ],
          [
           "SET/6 RED SPOTTY PAPER CUPS",
           "SET/20 RED RETROSPOT PAPER NAPKINS "
          ],
          [
           "ALARM CLOCK BAKELIKE PINK",
           "ALARM CLOCK BAKELIKE GREEN"
          ],
          [
           "ALARM CLOCK BAKELIKE PINK",
           "ALARM CLOCK BAKELIKE RED "
          ],
          [
           "SET/6 RED SPOTTY PAPER CUPS",
           "SET/20 RED RETROSPOT PAPER NAPKINS "
          ],
          [
           "DOLLY GIRL LUNCH BOX",
           "SPACEBOY LUNCH BOX "
          ],
          [
           "ALARM CLOCK BAKELIKE RED ",
           "ALARM CLOCK BAKELIKE GREEN"
          ],
          [
           "PLASTERS IN TIN CIRCUS PARADE ",
           "PLASTERS IN TIN SPACEBOY"
          ],
          [
           "PLASTERS IN TIN WOODLAND ANIMALS",
           "PLASTERS IN TIN CIRCUS PARADE "
          ],
          [
           "PLASTERS IN TIN SPACEBOY",
           "PLASTERS IN TIN CIRCUS PARADE "
          ],
          [
           "ALARM CLOCK BAKELIKE GREEN",
           "ALARM CLOCK BAKELIKE RED "
          ],
          [
           "ALARM CLOCK BAKELIKE PINK",
           "ALARM CLOCK BAKELIKE RED "
          ],
          [
           "PLASTERS IN TIN WOODLAND ANIMALS",
           "PLASTERS IN TIN SPACEBOY"
          ],
          [
           "PLASTERS IN TIN WOODLAND ANIMALS",
           "PLASTERS IN TIN CIRCUS PARADE "
          ],
          [
           "PLASTERS IN TIN CIRCUS PARADE ",
           "PLASTERS IN TIN WOODLAND ANIMALS"
          ],
          [
           "ROUND SNACK BOXES SET OF 4 FRUITS ",
           "ROUND SNACK BOXES SET OF4 WOODLAND "
          ],
          [
           "SPACEBOY LUNCH BOX ",
           "DOLLY GIRL LUNCH BOX"
          ],
          [
           "LUNCH BAG WOODLAND",
           "LUNCH BAG SPACEBOY DESIGN "
          ],
          [
           "LUNCH BAG SPACEBOY DESIGN ",
           "LUNCH BAG WOODLAND"
          ],
          [
           "LUNCH BAG SPACEBOY DESIGN ",
           "LUNCH BAG RED RETROSPOT"
          ],
          [
           "LUNCH BAG SPACEBOY DESIGN ",
           "LUNCH BAG APPLE DESIGN"
          ],
          [
           "PLASTERS IN TIN CIRCUS PARADE ",
           "PLASTERS IN TIN SPACEBOY"
          ],
          [
           "STRAWBERRY LUNCH BOX WITH CUTLERY",
           "LUNCH BOX WITH CUTLERY RETROSPOT "
          ],
          [
           "LUNCH BAG APPLE DESIGN",
           "LUNCH BAG SPACEBOY DESIGN "
          ],
          [
           "LUNCH BAG APPLE DESIGN",
           "LUNCH BAG RED RETROSPOT"
          ]
         ],
         "hoverlabel": {
          "namelength": 0
         },
         "hovertemplate": "support=%{x}<br>confidence=%{y}<br>lift=%{z}<br>antecedents=%{customdata[0]}<br>consequents=%{customdata[1]}<br>antecedent support=%{marker.color}",
         "legendgroup": "",
         "marker": {
          "color": [
           0.0868,
           0.0868,
           0.1085,
           0.0586,
           0.1171,
           0.0629,
           0.0629,
           0.0629,
           0.0803,
           0.1041,
           0.0672,
           0.1085,
           0.0846,
           0.0803,
           0.1085,
           0.1128,
           0.1128,
           0.0781,
           0.1128,
           0.1193,
           0.0846,
           0.1171,
           0.0868,
           0.0868,
           0.1171,
           0.0868,
           0.0803,
           0.0868,
           0.0889,
           0.1193,
           0.0846,
           0.0868,
           0.1453,
           0.1453,
           0.1475,
           0.0933,
           0.1063,
           0.102,
           0.1041,
           0.1041,
           0.1041,
           0.1475,
           0.1041,
           0.1085,
           0.1085
          ],
          "coloraxis": "coloraxis",
          "opacity": 0.7,
          "symbol": "circle"
         },
         "mode": "markers",
         "name": "",
         "scene": "scene",
         "showlegend": false,
         "type": "scatter3d",
         "x": [
          0.0846,
          0.0846,
          0.1041,
          0.0542,
          0.1041,
          0.0542,
          0.0542,
          0.0542,
          0.0672,
          0.0846,
          0.0542,
          0.0868,
          0.0672,
          0.0629,
          0.0846,
          0.0868,
          0.0868,
          0.0586,
          0.0846,
          0.0889,
          0.0629,
          0.0868,
          0.0629,
          0.0629,
          0.0846,
          0.0607,
          0.0542,
          0.0586,
          0.0586,
          0.0781,
          0.0542,
          0.0542,
          0.0889,
          0.0868,
          0.0868,
          0.0542,
          0.0607,
          0.0564,
          0.0564,
          0.0564,
          0.0564,
          0.0781,
          0.0542,
          0.0564,
          0.0564
         ],
         "y": [
          0.975,
          0.975,
          0.96,
          0.9259,
          0.8889,
          0.8621,
          0.8621,
          0.8621,
          0.8378,
          0.8125,
          0.8065,
          0.8,
          0.7949,
          0.7838,
          0.78,
          0.7692,
          0.7692,
          0.75,
          0.75,
          0.7455,
          0.7436,
          0.7407,
          0.725,
          0.725,
          0.7222,
          0.7,
          0.6757,
          0.675,
          0.6585,
          0.6545,
          0.641,
          0.625,
          0.6119,
          0.597,
          0.5882,
          0.5814,
          0.5714,
          0.5532,
          0.5417,
          0.5417,
          0.5417,
          0.5294,
          0.5208,
          0.52,
          0.52
         ],
         "z": [
          8.3236,
          8.9895,
          8.1956,
          14.719,
          8.1956,
          14.719,
          10.7409,
          10.1901,
          9.9037,
          7.2031,
          9.2944,
          7.0923,
          9.9037,
          9.0331,
          8.9895,
          7.0923,
          6.567,
          5.1604,
          7.2031,
          5.1292,
          8.5699,
          6.567,
          8.5699,
          9.0331,
          8.3236,
          6.5857,
          10.7409,
          5.6577,
          4.4645,
          4.4374,
          10.1901,
          9.2944,
          5.1292,
          4.0474,
          4.0474,
          4.1879,
          6.5857,
          5.3129,
          5.3129,
          4.0936,
          4.9942,
          4.4374,
          4.2124,
          4.9942,
          3.9298
         ]
        }
       ],
       "layout": {
        "coloraxis": {
         "colorbar": {
          "title": {
           "text": "antecedent support"
          }
         },
         "colorscale": [
          [
           0,
           "#0d0887"
          ],
          [
           0.1111111111111111,
           "#46039f"
          ],
          [
           0.2222222222222222,
           "#7201a8"
          ],
          [
           0.3333333333333333,
           "#9c179e"
          ],
          [
           0.4444444444444444,
           "#bd3786"
          ],
          [
           0.5555555555555556,
           "#d8576b"
          ],
          [
           0.6666666666666666,
           "#ed7953"
          ],
          [
           0.7777777777777778,
           "#fb9f3a"
          ],
          [
           0.8888888888888888,
           "#fdca26"
          ],
          [
           1,
           "#f0f921"
          ]
         ]
        },
        "height": 800,
        "legend": {
         "tracegroupgap": 0
        },
        "scene": {
         "domain": {
          "x": [
           0,
           1
          ],
          "y": [
           0,
           1
          ]
         },
         "xaxis": {
          "title": {
           "text": "support"
          }
         },
         "yaxis": {
          "title": {
           "text": "confidence"
          }
         },
         "zaxis": {
          "title": {
           "text": "lift"
          }
         }
        },
        "template": {
         "data": {
          "bar": [
           {
            "error_x": {
             "color": "#2a3f5f"
            },
            "error_y": {
             "color": "#2a3f5f"
            },
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "bar"
           }
          ],
          "barpolar": [
           {
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "barpolar"
           }
          ],
          "carpet": [
           {
            "aaxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "baxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "type": "carpet"
           }
          ],
          "choropleth": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "choropleth"
           }
          ],
          "contour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "contour"
           }
          ],
          "contourcarpet": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "contourcarpet"
           }
          ],
          "heatmap": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmap"
           }
          ],
          "heatmapgl": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmapgl"
           }
          ],
          "histogram": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "histogram"
           }
          ],
          "histogram2d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2d"
           }
          ],
          "histogram2dcontour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2dcontour"
           }
          ],
          "mesh3d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "mesh3d"
           }
          ],
          "parcoords": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "parcoords"
           }
          ],
          "pie": [
           {
            "automargin": true,
            "type": "pie"
           }
          ],
          "scatter": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter"
           }
          ],
          "scatter3d": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter3d"
           }
          ],
          "scattercarpet": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattercarpet"
           }
          ],
          "scattergeo": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergeo"
           }
          ],
          "scattergl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergl"
           }
          ],
          "scattermapbox": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattermapbox"
           }
          ],
          "scatterpolar": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolar"
           }
          ],
          "scatterpolargl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolargl"
           }
          ],
          "scatterternary": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterternary"
           }
          ],
          "surface": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "surface"
           }
          ],
          "table": [
           {
            "cells": {
             "fill": {
              "color": "#EBF0F8"
             },
             "line": {
              "color": "white"
             }
            },
            "header": {
             "fill": {
              "color": "#C8D4E3"
             },
             "line": {
              "color": "white"
             }
            },
            "type": "table"
           }
          ]
         },
         "layout": {
          "annotationdefaults": {
           "arrowcolor": "#2a3f5f",
           "arrowhead": 0,
           "arrowwidth": 1
          },
          "coloraxis": {
           "colorbar": {
            "outlinewidth": 0,
            "ticks": ""
           }
          },
          "colorscale": {
           "diverging": [
            [
             0,
             "#8e0152"
            ],
            [
             0.1,
             "#c51b7d"
            ],
            [
             0.2,
             "#de77ae"
            ],
            [
             0.3,
             "#f1b6da"
            ],
            [
             0.4,
             "#fde0ef"
            ],
            [
             0.5,
             "#f7f7f7"
            ],
            [
             0.6,
             "#e6f5d0"
            ],
            [
             0.7,
             "#b8e186"
            ],
            [
             0.8,
             "#7fbc41"
            ],
            [
             0.9,
             "#4d9221"
            ],
            [
             1,
             "#276419"
            ]
           ],
           "sequential": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ],
           "sequentialminus": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ]
          },
          "colorway": [
           "#636efa",
           "#EF553B",
           "#00cc96",
           "#ab63fa",
           "#FFA15A",
           "#19d3f3",
           "#FF6692",
           "#B6E880",
           "#FF97FF",
           "#FECB52"
          ],
          "font": {
           "color": "#2a3f5f"
          },
          "geo": {
           "bgcolor": "white",
           "lakecolor": "white",
           "landcolor": "#E5ECF6",
           "showlakes": true,
           "showland": true,
           "subunitcolor": "white"
          },
          "hoverlabel": {
           "align": "left"
          },
          "hovermode": "closest",
          "mapbox": {
           "style": "light"
          },
          "paper_bgcolor": "white",
          "plot_bgcolor": "#E5ECF6",
          "polar": {
           "angularaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "radialaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "scene": {
           "xaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "yaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "zaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           }
          },
          "shapedefaults": {
           "line": {
            "color": "#2a3f5f"
           }
          },
          "ternary": {
           "aaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "baxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "caxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "title": {
           "x": 0.05
          },
          "xaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          },
          "yaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          }
         }
        },
        "title": {
         "text": "3d Plot for Rule Mining"
        },
        "width": 900
       }
      },
      "text/html": [
       "<div>\n",
       "        \n",
       "        \n",
       "            <div id=\"ce04aaab-3e30-4ed7-9fc1-3cad35d9839e\" class=\"plotly-graph-div\" style=\"height:800px; width:900px;\"></div>\n",
       "            <script type=\"text/javascript\">\n",
       "                require([\"plotly\"], function(Plotly) {\n",
       "                    window.PLOTLYENV=window.PLOTLYENV || {};\n",
       "                    \n",
       "                if (document.getElementById(\"ce04aaab-3e30-4ed7-9fc1-3cad35d9839e\")) {\n",
       "                    Plotly.newPlot(\n",
       "                        'ce04aaab-3e30-4ed7-9fc1-3cad35d9839e',\n",
       "                        [{\"customdata\": [[\"SET/20 RED RETROSPOT PAPER NAPKINS \", \"SET/6 RED SPOTTY PAPER CUPS\"], [\"SET/20 RED RETROSPOT PAPER NAPKINS \", \"SET/6 RED SPOTTY PAPER PLATES\"], [\"SET/6 RED SPOTTY PAPER PLATES\", \"SET/6 RED SPOTTY PAPER CUPS\"], [\"CHILDRENS CUTLERY SPACEBOY \", \"CHILDRENS CUTLERY DOLLY GIRL \"], [\"SET/6 RED SPOTTY PAPER CUPS\", \"SET/6 RED SPOTTY PAPER PLATES\"], [\"CHILDRENS CUTLERY DOLLY GIRL \", \"CHILDRENS CUTLERY SPACEBOY \"], [\"ALARM CLOCK BAKELIKE GREEN\", \"ALARM CLOCK BAKELIKE RED \"], [\"ALARM CLOCK BAKELIKE RED \", \"ALARM CLOCK BAKELIKE GREEN\"], [\"ALARM CLOCK BAKELIKE RED \", \"ALARM CLOCK BAKELIKE GREEN\"], [\"SET/6 RED SPOTTY PAPER PLATES\", \"SET/20 RED RETROSPOT PAPER NAPKINS \"], [\"ALARM CLOCK BAKELIKE RED \", \"ALARM CLOCK BAKELIKE PINK\"], [\"SET/6 RED SPOTTY PAPER PLATES\", \"SET/20 RED RETROSPOT PAPER NAPKINS \"], [\"ALARM CLOCK BAKELIKE GREEN\", \"ALARM CLOCK BAKELIKE RED \"], [\"ALARM CLOCK BAKELIKE RED \", \"ALARM CLOCK BAKELIKE PINK\"], [\"SET/6 RED SPOTTY PAPER PLATES\", \"SET/20 RED RETROSPOT PAPER NAPKINS \"], [\"SET/20 RED RETROSPOT PAPER NAPKINS \", \"SET/6 RED SPOTTY PAPER PLATES\"], [\"SET/20 RED RETROSPOT PAPER NAPKINS \", \"SET/6 RED SPOTTY PAPER CUPS\"], [\"PLASTERS IN TIN CIRCUS PARADE \", \"PLASTERS IN TIN WOODLAND ANIMALS\"], [\"SET/20 RED RETROSPOT PAPER NAPKINS \", \"SET/6 RED SPOTTY PAPER PLATES\"], [\"PLASTERS IN TIN SPACEBOY\", \"PLASTERS IN TIN WOODLAND ANIMALS\"], [\"ALARM CLOCK BAKELIKE GREEN\", \"ALARM CLOCK BAKELIKE PINK\"], [\"SET/6 RED SPOTTY PAPER CUPS\", \"SET/20 RED RETROSPOT PAPER NAPKINS \"], [\"ALARM CLOCK BAKELIKE PINK\", \"ALARM CLOCK BAKELIKE GREEN\"], [\"ALARM CLOCK BAKELIKE PINK\", \"ALARM CLOCK BAKELIKE RED \"], [\"SET/6 RED SPOTTY PAPER CUPS\", \"SET/20 RED RETROSPOT PAPER NAPKINS \"], [\"DOLLY GIRL LUNCH BOX\", \"SPACEBOY LUNCH BOX \"], [\"ALARM CLOCK BAKELIKE RED \", \"ALARM CLOCK BAKELIKE GREEN\"], [\"PLASTERS IN TIN CIRCUS PARADE \", \"PLASTERS IN TIN SPACEBOY\"], [\"PLASTERS IN TIN WOODLAND ANIMALS\", \"PLASTERS IN TIN CIRCUS PARADE \"], [\"PLASTERS IN TIN SPACEBOY\", \"PLASTERS IN TIN CIRCUS PARADE \"], [\"ALARM CLOCK BAKELIKE GREEN\", \"ALARM CLOCK BAKELIKE RED \"], [\"ALARM CLOCK BAKELIKE PINK\", \"ALARM CLOCK BAKELIKE RED \"], [\"PLASTERS IN TIN WOODLAND ANIMALS\", \"PLASTERS IN TIN SPACEBOY\"], [\"PLASTERS IN TIN WOODLAND ANIMALS\", \"PLASTERS IN TIN CIRCUS PARADE \"], [\"PLASTERS IN TIN CIRCUS PARADE \", \"PLASTERS IN TIN WOODLAND ANIMALS\"], [\"ROUND SNACK BOXES SET OF 4 FRUITS \", \"ROUND SNACK BOXES SET OF4 WOODLAND \"], [\"SPACEBOY LUNCH BOX \", \"DOLLY GIRL LUNCH BOX\"], [\"LUNCH BAG WOODLAND\", \"LUNCH BAG SPACEBOY DESIGN \"], [\"LUNCH BAG SPACEBOY DESIGN \", \"LUNCH BAG WOODLAND\"], [\"LUNCH BAG SPACEBOY DESIGN \", \"LUNCH BAG RED RETROSPOT\"], [\"LUNCH BAG SPACEBOY DESIGN \", \"LUNCH BAG APPLE DESIGN\"], [\"PLASTERS IN TIN CIRCUS PARADE \", \"PLASTERS IN TIN SPACEBOY\"], [\"STRAWBERRY LUNCH BOX WITH CUTLERY\", \"LUNCH BOX WITH CUTLERY RETROSPOT \"], [\"LUNCH BAG APPLE DESIGN\", \"LUNCH BAG SPACEBOY DESIGN \"], [\"LUNCH BAG APPLE DESIGN\", \"LUNCH BAG RED RETROSPOT\"]], \"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"support=%{x}<br>confidence=%{y}<br>lift=%{z}<br>antecedents=%{customdata[0]}<br>consequents=%{customdata[1]}<br>antecedent support=%{marker.color}\", \"legendgroup\": \"\", \"marker\": {\"color\": [0.0868, 0.0868, 0.1085, 0.0586, 0.1171, 0.0629, 0.0629, 0.0629, 0.0803, 0.1041, 0.0672, 0.1085, 0.0846, 0.0803, 0.1085, 0.1128, 0.1128, 0.0781, 0.1128, 0.1193, 0.0846, 0.1171, 0.0868, 0.0868, 0.1171, 0.0868, 0.0803, 0.0868, 0.0889, 0.1193, 0.0846, 0.0868, 0.1453, 0.1453, 0.1475, 0.0933, 0.1063, 0.102, 0.1041, 0.1041, 0.1041, 0.1475, 0.1041, 0.1085, 0.1085], \"coloraxis\": \"coloraxis\", \"opacity\": 0.7, \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"\", \"scene\": \"scene\", \"showlegend\": false, \"type\": \"scatter3d\", \"x\": [0.0846, 0.0846, 0.1041, 0.0542, 0.1041, 0.0542, 0.0542, 0.0542, 0.0672, 0.0846, 0.0542, 0.0868, 0.0672, 0.0629, 0.0846, 0.0868, 0.0868, 0.0586, 0.0846, 0.0889, 0.0629, 0.0868, 0.0629, 0.0629, 0.0846, 0.0607, 0.0542, 0.0586, 0.0586, 0.0781, 0.0542, 0.0542, 0.0889, 0.0868, 0.0868, 0.0542, 0.0607, 0.0564, 0.0564, 0.0564, 0.0564, 0.0781, 0.0542, 0.0564, 0.0564], \"y\": [0.975, 0.975, 0.96, 0.9259, 0.8889, 0.8621, 0.8621, 0.8621, 0.8378, 0.8125, 0.8065, 0.8, 0.7949, 0.7838, 0.78, 0.7692, 0.7692, 0.75, 0.75, 0.7455, 0.7436, 0.7407, 0.725, 0.725, 0.7222, 0.7, 0.6757, 0.675, 0.6585, 0.6545, 0.641, 0.625, 0.6119, 0.597, 0.5882, 0.5814, 0.5714, 0.5532, 0.5417, 0.5417, 0.5417, 0.5294, 0.5208, 0.52, 0.52], \"z\": [8.3236, 8.9895, 8.1956, 14.719, 8.1956, 14.719, 10.7409, 10.1901, 9.9037, 7.2031, 9.2944, 7.0923, 9.9037, 9.0331, 8.9895, 7.0923, 6.567, 5.1604, 7.2031, 5.1292, 8.5699, 6.567, 8.5699, 9.0331, 8.3236, 6.5857, 10.7409, 5.6577, 4.4645, 4.4374, 10.1901, 9.2944, 5.1292, 4.0474, 4.0474, 4.1879, 6.5857, 5.3129, 5.3129, 4.0936, 4.9942, 4.4374, 4.2124, 4.9942, 3.9298]}],\n",
       "                        {\"coloraxis\": {\"colorbar\": {\"title\": {\"text\": \"antecedent support\"}}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"height\": 800, \"legend\": {\"tracegroupgap\": 0}, \"scene\": {\"domain\": {\"x\": [0.0, 1.0], \"y\": [0.0, 1.0]}, \"xaxis\": {\"title\": {\"text\": \"support\"}}, \"yaxis\": {\"title\": {\"text\": \"confidence\"}}, \"zaxis\": {\"title\": {\"text\": \"lift\"}}}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"title\": {\"text\": \"3d Plot for Rule Mining\"}, \"width\": 900},\n",
       "                        {\"responsive\": true}\n",
       "                    ).then(function(){\n",
       "                            \n",
       "var gd = document.getElementById('ce04aaab-3e30-4ed7-9fc1-3cad35d9839e');\n",
       "var x = new MutationObserver(function (mutations, observer) {{\n",
       "        var display = window.getComputedStyle(gd).display;\n",
       "        if (!display || display === 'none') {{\n",
       "            console.log([gd, 'removed!']);\n",
       "            Plotly.purge(gd);\n",
       "            observer.disconnect();\n",
       "        }}\n",
       "}});\n",
       "\n",
       "// Listen for the removal of the full notebook cells\n",
       "var notebookContainer = gd.closest('#notebook-container');\n",
       "if (notebookContainer) {{\n",
       "    x.observe(notebookContainer, {childList: true});\n",
       "}}\n",
       "\n",
       "// Listen for the clearing of the current output cell\n",
       "var outputEl = gd.closest('.output');\n",
       "if (outputEl) {{\n",
       "    x.observe(outputEl, {childList: true});\n",
       "}}\n",
       "\n",
       "                        })\n",
       "                };\n",
       "                });\n",
       "            </script>\n",
       "        </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_model(model2, plot = '3d')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
